package net.huashitong.threeSeven.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
import net.huashitong.threeSeven.dao.JdFinishDetailDao;
import net.huashitong.threeSeven.entity.IndexWithArea;
import net.huashitong.threeSeven.entity.JdFinishDetail;
import net.huashitong.threeSeven.filter.RequestModelFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JdFinishDeatilService extends StringPKService<JdFinishDetail> {

    @Autowired
    private JdFinishDetailDao dao;

    @Autowired
    private SysTableService tableService;

    @Override
    protected BaseDao<JdFinishDetail, String> getDao() {
        return dao;
    }

    @Override
    protected void beforeSave(JdFinishDetail obj) {
        obj.setSysId(tableService.updateMaxSysId("t_gis_tsFinishDetail", null));
    }

    public List<JdFinishDetail> queryByTime(RequestModelFilter filter){
        return dao.queryByTime(filter);
    }

}
